package cn.funeralobjects.web.api;

import cn.funeralobjects.asms.web.model.MSmsSend;
import cn.funeralobjects.asms.web.model.MSmsSendCode;
import cn.funeralobjects.asms.web.model.VSmsSendRecord;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * @author FuneralObjects
 * Create date: 2020/6/1 7:05 AM
 */
@Validated
public interface SmsSendApi {

    /**
     * 发送短信
     *
     * @param mSmsSend 短信请求
     * @return 发送反馈
     */
    @PostMapping
    Mono<List<VSmsSendRecord>> sendSms(@RequestBody MSmsSend mSmsSend);

    @PostMapping(params = "use-code")
    Mono<List<VSmsSendRecord>> sendSms(@RequestBody MSmsSendCode mSmsSendCode);
}
